<?php

namespace App\HttpController;

use App\Libs\Redis\Redis;
use EasySwoole\Http\AbstractInterface\Controller;
use Model\User;
use MongoDB;

class Index extends Controller
{
    public function index()
    {
        $data = User::query()->get();
        return $this->response()->write(json_encode($data));
    }

    public function getRedis()
    {
        $redis = Redis::getInstance();
        $this->response()->write($redis->get('test'));
    }

    public function mongo()
    {
        $mongo = (new MongoDB\Client)->videoweb->video;
    }
}